#ifndef __EXPORT__
#define __EXPORT__

#include "Export.h"
#include "OptionTools.h"
#include "ProcessData.h"
#include "ContractColumnTitle.h"
#include "QuotationGui.h"
#include "StkItem.h"
#include "StkTrdCtrl.h"
#include "SubjectGui.h"
#include "IOptionUi.h"
#include "IFrameTools.h"

IFrameTools * glbFrameTools = nullptr;
IOptionTools * glbOptCtrTools = nullptr;               
IOptionUiTools * glbOptUiTools = nullptr;


__declspec(dllexport) bool __cdecl AddInstance(IKernel * ptrKernel)
{
	bool bRetVal = false;
	try
	{
		glbFrameTools = reinterpret_cast<IFrameTools *>(ptrKernel->Tools());
		ptrKernel->AddInstance(COptionTools::Instance());
		ptrKernel->AddInstance(C_L3030300::Instance());
		ptrKernel->AddInstance(C_L3030101::Instance());
		ptrKernel->AddInstance(C_L3030303::Instance());
		ptrKernel->AddInstance(C_L3030304::Instance());
		ptrKernel->AddInstance(C_L2934010::Instance());
		ptrKernel->AddInstance(C_L3030302::Instance());
		ptrKernel->AddInstance(C_L3030403::Instance());
		ptrKernel->AddInstance(C_CONFIRM15::Instance());
		ptrKernel->AddInstance(C_MARKET1::Instance());
		ptrKernel->AddInstance(C_MATCH15::Instance());
		ptrKernel->AddInstance(CCalculateContractQuotation::Instance());
		ptrKernel->AddInstance(CContractColumnTitle::Instance());
		ptrKernel->AddInstance(CQuotationGui::Instance());
		ptrKernel->AddInstance(CStkItem::Instance());
		ptrKernel->AddInstance(CStkTrdCtrl::Instance());
		ptrKernel->AddInstance(CSubjectGui::Instance());
	}
	catch (...)
	{
		goto __end;
	}
	bRetVal = true;
__end:
	return bRetVal;
}

#endif//__EXPORT__